package com.smart.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.smart.common.PageInfo;
import com.smart.model.domain.JiansheUnitDO;
import com.smart.model.request.JiansheUnitAddRequest;
import com.smart.model.request.JiansheUnitDeleteProjectRequest;
import com.smart.model.request.JiansheUnitRequest;
import com.smart.model.request.JiansheUnitUpdateRequest;
import com.smart.model.vo.JiansheUnitVO;
import com.smart.model.vo.ProjectVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface JiansheUnitService extends IService<JiansheUnitDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
     JiansheUnitVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<JiansheUnitVO> pageQuery(JiansheUnitRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<JiansheUnitVO> listQuery(JiansheUnitRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(JiansheUnitAddRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(JiansheUnitUpdateRequest request);
    /**
     * 删除关联的项目
     * @param request
     * @return
     */
    Boolean deleteProject(JiansheUnitDeleteProjectRequest request);
    /**
     * 重置密码
     * @param id
     * @return
     */
    Boolean resetPassword(long id);

    /**
     *
     * @param unitName
     * @return
     */
    List<ProjectVO> queryByName(String unitName);
}
